package appapi.entity.bridge;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 请求对象
 *
 * @author luocheng
 * @version 1.0
 * @date 2023/09/18 13:59
 */
@Data
@ApiModel
@TableName("device_aiexception")
public class AiExceptionEntity implements Serializable {
    private static final long serialVersionUID = 615441184765340345L;

    @ApiModelProperty(value = "自编号记录Id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "设备sn")
    private String deviceSn;
    @ApiModelProperty(value = "告警内容")
    private String alarmDetail;
    @ApiModelProperty(value = "告警对象")
    private String alarmSource;
    @ApiModelProperty(value = "告警来源")
    private String alarmKind;
    @ApiModelProperty(value = "层级")
    private Integer alarmLevel;
    @ApiModelProperty(value = "告警时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime timeStamp;
    @ApiModelProperty(value = "是否触发")
    private Boolean alarmTrigger;
    @ApiModelProperty(value = "实际值")
    private String alarmValue;
    @ApiModelProperty(value = "力矩百分比")
    private String alarmRate;
    @ApiModelProperty(value = "添加时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    @ApiModelProperty(value = "告警状态 0待处理 1已处理")
    private Integer alarmStatus;
    @ApiModelProperty(value = "告警图片地址")
    private String alarmPicUrl;
}
